package com.member.common.enums;


import lombok.Getter;

import java.util.Objects;

@Getter
public enum ProcessStatusEnum {
    UN_PROCESS(1, "待审核"),
    PASS_PROCESS( 2, "审核通过"),
    NOT_PASS_PROCESS( 3, "审核不通过");

    private final Integer key;
    private final String desc;

    ProcessStatusEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static ProcessStatusEnum getByKey(Integer _key) {
        for (ProcessStatusEnum item : ProcessStatusEnum.values()) {
            if (Objects.equals(item.getKey(), _key)) {
                return item;
            }
        }
        return null;
    }

}
